﻿using Prism.Events;
using System;

namespace Base.Common.Events
{
    /// <summary>
    /// USB状态改变事件
    /// </summary>
    public class UsbChangedEvent: PubSubEvent<UsbChangedEventArgs>
    {
    }

    /// <summary>
    /// USB状态改变事件参数
    /// </summary>
    public class UsbChangedEventArgs: EventArgs
    {
        public UsbChangeTypes UsbChangeType 
        {
            get; 
            private set; 
        }

        public UsbChangedEventArgs(UsbChangeTypes type)
        {
            UsbChangeType = type;
        }
    }

    /// <summary>
    /// U盘状态改变类型
    /// </summary>
    public enum UsbChangeTypes
    {
        /// <summary>
        /// U盘可用
        /// </summary>
        DBT_DEVICEARRIVAL = 0x8000,

        /// <summary>
        /// U盘卸载
        /// </summary>
        DBT_DEVICEREMOVECOMPLETE = 0x8004,
    }
}
